package com.chengxiaoxiao.ai_demo.service.ai;

import dev.langchain4j.service.MemoryId;
import dev.langchain4j.service.SystemMessage;
import dev.langchain4j.service.TokenStream;
import dev.langchain4j.service.UserMessage;

/**
 * 指标AI业务逻辑类
 *
 * @Description:
 * @Author Cheng Xiaoxiao
 * @Date: 2025/3/7 14:23
 */
@dev.langchain4j.service.spring.AiService
public interface IndexAiService {

    /**
     * 流式聊天
     *
     * @param memoryId 会话ID
     * @param message  用户输入文本
     * @return 结果
     */
    @SystemMessage(fromResource = "chat-prompt.md")
    TokenStream chatStream(@MemoryId String memoryId, @UserMessage String message);
}
